<template name="addRequirement">
  <h1 class="submit-title">发布作业</h1>
  <form class="form-submit">

    <div class="form-group {{errorClass 'name' 'requirementAddErrors'}}">
      <label for="name">作业名称</label>
      <input type="text" class="form-control" name="name">
      <span class="help-block">{{errorMessage 'name' 'requirementAddErrors'}}</span>
    </div>

    <div class="form-group {{errorClass 'date' 'requirementAddErrors'}}">
      <label for="date">截止日期（yyyy-mm-dd）</label>
      <input type="date" class="form-control" name="date">
      <span class="help-block">{{errorMessage 'date' 'requirementAddErrors'}}</span>
    </div>

    <div class="form-group {{errorClass 'course' 'requirementAddErrors'}}">
      <div class="radio">
        {{#each getCourses}}
          <label class="radio-inline">
            <input type="radio" name="course" value="{{_id}}">
            {{name}}
          </label>
        {{/each}}
      </div>
      <span class="help-block">{{errorMessage 'course' 'requirementAddErrors'}}</span>
    </div>

    <div class="form-group {{errorClass 'content' 'requirementAddErrors'}}">
      <label for="content">作业内容</label>
      <textarea name="content" id="content" class="form-control" rows="3"></textarea>
      <span class="help-block">{{errorMessage 'content' 'requirementAddErrors'}}</span>
    </div>

    <button type="submit" class="btn btn-primary">提交</button>
  </form>
</template>